/*
 * @Author: LiMG
 * @Date: 2024-01-18 13:52:07
 * @Description: 文件描述
 */
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import VueSetupExtend from "vite-plugin-vue-setup-extend";
// import { fileURLToPath, URL } from "node:url";

import { resolve } from "path";

const pathResolve = (dir: string): any => {
    return resolve(__dirname, ".", dir);
};

const alias: Record<string, string> = {
    "@": pathResolve("src"),
};
// https://vitejs.dev/config/
export default defineConfig({
    plugins: [vue(), VueSetupExtend()],
    resolve: {
        // alias: {
        //   "@": fileURLToPath(new URL("./src", import.meta.url)),
        // },
        alias,
    },
});
